


Namespace Producto
Public Class Marca



 Public Function Combo(ByVal vTodos As Boolean, Optional ByVal vmensaje As String = "Todos") As Entity.Producto.MarcaCol
dim objCol as  New entity.Producto.MarcaCol
dim obj as  New Data.Producto.Marca
objCol = obj.Listar("", _
		-1, _
		"", _
		"", _
		-1)
 If vTodos Then
Dim ent As New Entity.Producto.Marca( _ 
		-1, _
		vmensaje , _
		"", _
		-1)
objCol.AddPrimero(ent)
End If
Return objCol
End Function


'***************************


public Function Listar(MarcaId as integer) as Entity.Producto.Marca

dim objEnt as  New entity.Producto.Marca
dim obj as  New Data.Producto.Marca
return obj.Listar(MarcaId)

End Function


'***************************



public Function Listar( _
		MarcaId as Integer, _
		Nombre as String, _
		Descripcion as String, _
		Catalogo as Integer) _
as  Entity.Producto.MarcaCol

dim objCol as  New entity.Producto.MarcaCol
dim obj as  New Data.Producto.Marca
return obj.listar("", _
		MarcaId, _
		Nombre, _
		Descripcion, _
		Catalogo)

End Function


'***************************


public Function Grabar( _
		MarcaId as Integer, _
		Nombre as String, _
		Descripcion as String, _
		Catalogo as Integer, _
vUSuario as integer)as  integer

dim _codigo as integer =-1
dim obj as  New Data.Producto.Marca
 if MarcaId=-1 then 
_codigo= obj.insert( "", _
		MarcaId , _
		Nombre , _
		Descripcion , _
		Catalogo , _
 vUSuario )
else
_codigo= obj.update( "", _
		MarcaId , _
		Nombre , _
		Descripcion , _
		Catalogo , _
 vUSuario )
end if 
return _codigo

End Function


'***************************


public Function Insertar( _
		MarcaId as Integer, _
		Nombre as String, _
		Descripcion as String, _
		Catalogo as Integer, _
vUSuario as integer)as  integer

dim _codigo as integer =-1
dim obj as  New Data.Producto.Marca
_codigo= obj.insert( "", _
		MarcaId, _
		Nombre, _
		Descripcion, _
		Catalogo, _
 vUSuario )
return _codigo

End Function


'***************************


public Function Updatear( _
		MarcaId as Integer, _
		Nombre as String, _
		Descripcion as String, _
		Catalogo as Integer, _
vUSuario as integer)as  integer

dim _codigo as integer =-1
dim obj as  New Data.Producto.Marca
_codigo= obj.Update( "", _
		MarcaId , _
		Nombre , _
		Descripcion , _
		Catalogo , _
 vUSuario )
return _codigo

End Function


'***************************


public Function ELiminar(  MarcaId as integer,vusuario as integer ,optional vopcion as string="Delete") as integer
dim _codigo as integer =-1
dim obj as  New Data.Producto.Marca
_codigo= obj.Eliminar( "vopcion", MarcaId ,vusuario)
return _codigo

End Function

End Class



end namespace

